package com.ybu.oodd.mapper;

import com.ybu.oodd.pojo.HomeText;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface HomeMapper {
    //总人数
    @Select("select count(0) from user")
    Integer getTotalUsers();

    //公司数
    @Select("select count(0) from job")
    Integer getCompanyCount();

    //岗位数
    @Select("select sum(job_num) from job")
    Integer getJobCount();

    //投递数
    @Select("select count(0) from status where status_id not in(20,26)")
    Integer getDeliveredCount();

    /*
     * 查询主页文字 mysql
     * */
    @Select("select value from keyword where type = 'home_text'")
    String getHomeText();

    /*
     * 查询主页标题 mysql
     * */
    @Select("select value from keyword where type = 'home_title'")
    String getHomeTitle();
}
